// app.js
App({
  onLaunch() {
    // 获取手机信息
    let systemInfo = wx.getSystemInfoSync();
    // 屏幕顶部状态栏
    let statusBarHeight = Number(systemInfo.statusBarHeight);
    // 底部安全区域
    let iosSABottom = Number(
      systemInfo.screenHeight - systemInfo.safeArea.bottom
    );
    //内容安全距离 = 100vh - 顶部状态栏 - 底部安全区域 - 自定义tabbar - 自定义navbar
    this.globalData.contentSafeHeight =
      statusBarHeight +
      iosSABottom +
      this.globalData.tabbarHeight +
      this.globalData.navbarHeight;

    // const token = wx.getStorageSync('token')
    // const tenant = wx.getStorageSync('tenantCode')
    // if(!token||!tenant){}
  },
  globalData: {
    auth: [],
    navbarHeight: 48,
    tabbarHeight: 46,
    contentSafeHeight: 0,
  },
});
